package com.example.win.android_banduyujia.http.request;

import com.example.win.android_banduyujia.http.UrlContext;

import java.util.Map;

/**
 * Created by Win on 2015/9/23.
 */
public class RegisterRequest extends BaseHttpRequest{
    public final static String URL = UrlContext.Url_REGISTER.getContext();

    private String mUserName;
    private String mPassword;
    private String mCode;
    private String mDevices;

    public RegisterRequest(String userName, String validCode, String password, String devices) {
        this.mUserName = userName;
        this.mCode = validCode;
        this.mPassword = password;
        this.mDevices = devices;
    }

    @Override
    protected String toRequestURL() {
        return URL;
    }

    @Override
    protected String toHttpMethod() {
        return HTTP_METHOD_POST;
    }

    @Override
    protected void toHttpRequestParams(Map<String, String> params) {
        params.put("cellphone", mUserName);
        params.put("password",  mPassword);
        params.put("verify_code", mCode);
        params.put("devices", "2");
    }
}
